import { MockMethod } from "vite-plugin-mock"

export default [
  {
    url: "/dev-api/system/menu/search",
    timeout: 2000,
    method: "post",
    response: () => {
      return {
        "code": 20000,
        "message": "查询成功",
        "data": [{
          "id": "1111",
          "parentId": null,
          "type": "1",
          "path": "/home",
          "name": "Home", // 路由名称
          "code": "home", // 权限标识
          "redirect": null,
          "component": "home/index.vue", // 不要写 @/views/
          "meta": {
            "title": "首页",
            "icon": "ele-HomeFilled",
            "cache": true,
            "hidden": false,
            "isBreadcrumd": true
          },
          "sort": 1,
          "remark": "@ctitle",
          "createTime": "@date",
          "updateTime": "@date",
          "children": []
        },
        {
          "id": "2222",
          "parentId": null,
          "type": "1",
          "path": "/system",
          "name": "System",
          "code": "system",
          "redirect": "/system/menu",
          "component": null,
          "meta": {
            "title": '系统管理',
            "icon": 'ele-Setting',
            "cache": true,
            "hidden": false,
            "isBreadcrumd": true
          },
          "sort": 2,
          "remark": "@ctitle",
          "createTime": "@date",
          "updateTime": "@date",
          "children": [{
            "id": "22221",
            "parentId": "2222",
            "type": "1",
            "path": '/system/menu',
            "name": 'SystemMenu',
            "code": "system:menu",
            "redirect": null,
            "component": "system/menu/index.vue",
            "meta": {
              "title": '菜单管理',
              "icon": 'ele-Menu',
              "cache": true,
              "hidden": false,
              "isBreadcrumd": true,
            },
            "sort": 1,
            "remark": "@ctitle",
            "createTime": "@date",
            "updateTime": "@date",
            "children": [{
              "id": "222211",
              "parentId": "22221",
              "type": "2", // 2 操作按钮
              "path": null,
              "name": null,
              "redirect": null,
              "code": "system:menu:search",
              "meta": {
                "title": "查询列表",
                "icon": null,
                "cache": true,
                "hidden": true,
              },
              "sort": 1,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222212",
              "parentId": "22221",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "system:menu:add",
              "meta": {
                "title": "新增菜单",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 2,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222213",
              "parentId": "22221",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "system:child:add",
              "meta": {
                "title": "新增下级",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 3,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222214",
              "parentId": "22221",
              "type": "2",
              "name": null,
              "path": null,
              "redirect": null,
              "code": "system:menu:edit",
              "meta": {
                "title": "修改菜单",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 4,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222215",
              "parentId": "22221",
              "type": "2",
              "name": null,
              "path": null,
              "redirect": null,
              "code": "system:menu:delete",
              "meta": {
                "title": "删除菜单",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 5,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            }
            ]
          },
          {
            "id": "22222",
            "parentId": "2222",
            "type": "1",
            "path": '/system/role',
            "name": 'SystemRole',
            "code": "system:role",
            "redirect": null,
            "component": "system/role/index.vue",
            "meta": {
              "title": '角色管理',
              "icon": 'ele-IceCream',
              "cache": true,
              "hidden": false,
              "isBreadcrumd": true,
            },
            "sort": 2,
            "remark": "@ctitle",
            "createTime": "@date",
            "updateTime": "@date",
            "children": [{
              "id": "222221",
              "parentId": "22222",
              "type": "2",
              "name": null,
              "path": null,
              "redirect": null,
              "code": "system:role:search",
              "meta": {
                "title": '查询角色',
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 1,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222222",
              "parentId": "22222",
              "type": "2",
              "name": null,
              "path": null,
              "redirect": null,
              "code": "system:role:add",
              "meta": {
                "title": '新增角色',
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 2,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222223",
              "parentId": "22222",
              "type": "2",
              "name": null,
              "path": null,
              "redirect": null,
              "code": "system:role:edit",
              "meta": {
                "title": '修改角色',
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 3,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222224",
              "parentId": "22222",
              "type": "2",
              "name": null,
              "path": null,
              "redirect": null,
              "code": "system:role:delete",
              "meta": {
                "title": '删除角色',
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 4,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222225",
              "parentId": "22222",
              "type": "2",
              "name": null,
              "path": null,
              "redirect": null,
              "code": "system:role:menu",
              "meta": {
                "title": '分配权限',
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 5,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            }
            ]
          },
          {
            "id": "22223",
            "parentId": "2222",
            "type": "1",
            "path": '/system/user',
            "name": 'SystemUser',
            "code": "system:user",
            "redirect": null,
            "component": "system/user/index.vue",
            "meta": {
              "title": '用户管理',
              "icon": 'ele-User',
              "cache": true,
              "hidden": false,
              "isBreadcrumd": true,
            },
            "sort": 3,
            "remark": "@ctitle",
            "createTime": "@date",
            "updateTime": "@date",
            "children": [{
              "id": "222231",
              "parentId": "22222",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "system:user:search",
              "meta": {
                "title": "查询用户",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 1,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222232",
              "parentId": "22222",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "system:user:add",
              "meta": {
                "title": "新增用户",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 2,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222233",
              "parentId": "22222",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "system:user:edit",
              "meta": {
                "title": "修改用户",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 3,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222234",
              "parentId": "22222",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "system:user:delete",
              "meta": {
                "title": "删除用户",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 4,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "222236",
              "parentId": "22222",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "system:user:password",
              "meta": {
                "title": "密码重置",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 6,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            ]
          }
          ]
        },
        {
          "id": "3333",
          "parentId": null,
          "type": "1",
          "path": "/goods",
          "name": "Goods",
          "code": "goods",
          "redirect": "/goods/list",
          "meta": {
            "title": '商品管理',
            "icon": 'ele-Undefine',
            "cache": true,
            "hidden": false,
            "isBreadcrumd": true,
          },
          "sort": 3,
          "remark": "@ctitle",
          "createTime": "@date",
          "updateTime": "@date",
          "children": [{
            "id": "33331",
            "parentId": "3333",
            "type": "1",
            "path": '/goods/list',
            "name": 'GoodsList',
            "redirect": null,
            "component": "goods/list.vue",
            "meta": {
              "title": '商品列表',
              "icon": 'ele-Undefine',
              "cache": false,
              "hidden": false,
              "isBreadcrumd": true,
            },
            "sort": 1,
            "remark": "@ctitle",
            "createTime": "@date",
            "updateTime": "@date",
            "children": [{
              "id": "333311",
              "parentId": "33331",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "goods:search",
              "meta": {
                "title": "查询商品",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 1,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "333312",
              "parentId": "33331",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "goods:add",
              "meta": {
                "title": "新增商品",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 2,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "333313",
              "parentId": "33331",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "goods:edit",
              "meta": {
                "title": "修改商品",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 3,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "333314",
              "parentId": "33331",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "goods:delete",
              "meta": {
                "title": "删除商品",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 4,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            }
            ]
          },
          {
            "id": "33332",
            "parentId": "3333",
            "type": "1",
            "path": '/goods/category',
            "name": 'GoodsCategory',
            "redirect": null,
            "component": "goods/category.vue",
            "meta": {
              "title": '商品分类',
              "icon": 'ele-Undefine',
              "cache": false,
              "hidden": false,
              "isBreadcrumd": true,
            },
            "sort": 2,
            "remark": "@ctitle",
            "createTime": "@date",
            "updateTime": "@date",
            "children": [{
              "id": "333321",
              "parentId": "33332",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "goods:category:search",
              "meta": {
                "title": "查询分类",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 1,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "333322",
              "parentId": "33332",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "goods:category:add",
              "meta": {
                "title": "新增分类",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 2,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "333323",
              "parentId": "33332",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "goods:category:edit",
              "meta": {
                "title": "修改分类",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 3,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            },
            {
              "id": "333324",
              "parentId": "33332",
              "type": "2",
              "path": null,
              "name": null,
              "redirect": null,
              "code": "goods:category:delete",
              "meta": {
                "title": "删除分类",
                "icon": null,
                "cache": true,
                "hidden": true
              },
              "sort": 4,
              "remark": "@ctitle",
              "createTime": "@date",
              "updateTime": "@date",
              "children": []
            }
            ]
          }
          ]
        },
        {
          "id": "4444",
          "parentId": null,
          "type": "1",
          "path": "/mengxuegu",
          "name": "Mengxuegu", // 路由名称
          "code": "mengxuegu", // 权限标识
          "redirect": null,
          "component": "link/index.vue",
          "meta": {
            "title": "梦学谷官网",
            "icon": "ele-Link",
            "linkTo": 'https://www.mengxuegu.com', // 外链跳转地址
            "cache": true,
            "hidden": false,
            "isBreadcrumd": true,
          },
          "sort": 4,
          "remark": "@ctitle",
          "createTime": "@date",
          "updateTime": "@date",
          "children": []
        }
        ]
      }
    },
  },
  {
    url: "/dev-api/system/menu/:id",
    timeout: 2000,
    method: "delete",
    response: () => {
      return {
        "code": 20000,
        "message": "删除成功",
        "data": true
      }
    }
  },
  {
    url: "/dev-api/system/menu/select",
    timeout: 2000,
    method: "get",
    response: () => {
      return {
        "code": 20000,
        "message": "查询成功",
        "data": [
          {
            "id": "1111",
            "parentId": null,
            "title": "首页",
            "children": []
          },
          {
            "id": "2222",
            "parentId": null,
            "title": "系统管理",
            "children": [{
              "id": "22221",
              "parentId": "2222",
              "title": '菜单管理',
              "children": []
            },
            {
              "id": "22222",
              "parentId": "2222",
              "title": '角色管理',
              "children": []
            },
            {
              "id": "22223",
              "parentId": "2222",
              "title": '用户管理',
              "children": []
            }
            ]
          },
          {
            "id": "3333",
            "parentId": null,
            "title": "商品管理",
            "children": [{
              "id": "33331",
              "parentId": "3333",
              "title": '商品列表',
              "children": []
            },
            {
              "id": "33332",
              "parentId": "3333",
              "title": '商品分类',
              "children": []
            }
            ]
          },
          {
            "id": "4444",
            "parentId": null,
            "title": "梦学谷官网",
            "children": []
          }
        ]
      }
    }
  },
  {
    url: "/dev-api/system/menu",
    timeout: 2000,
    method: "post",
    response: () => {
      return {
        "code": 20000,
        "message": "新增成功",
        "data": true
      }
    }
  },
  {
    url: "/dev-api/system/menu",
    timeout: 2000,
    method: "put",
    response: () => {
      return {
        "code": 20000,
        "message": "修改成功",
        "data": true
      }
    }
  },
] as MockMethod[]

